
SHELL = @SHELL@
top_srcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
CCDEPMODE = @CCDEPMODE@

@SET_MAKE@

CXXFLAGS = @CXXFLAGS@ $(CFLGS) -I. -I$(top_srcdir) -I$(top_srcdir)/build -I$(top_srcdir)/src -I$(top_srcdir)/lib @DEFS@

include $(top_srcdir)/build/build.mk

OBJS = \
	base64.o \
	Array.o \
	BinaryTree.o \
	Cstrings.o \
	HashTable.o \
	List.o \
	SortedList.o \
	Stack.o \
	String.o \
	Stream.o \
	Queue.o

.PHONY: default clean distclean bdlib test build_msg

default:
	@echo ""
	@echo "Let's try this from the right directory..."
	@echo ""
	@cd ../.. && $(MAKE)

clean:
	@rm -f .depend *.o *~
	@rm -f *_test test/*.o
	@rm -f $(BDLIB)
	-+@cd tests && $(MAKE) clean

distclean: clean
	@rm -rf .deps Makefile
	-+@cd tests && $(MAKE) distclean

bdlib: build_msg $(BDLIB)

$(BDLIB): $(OBJS)
	@echo "[AR]	$@"
	ar -rcs $@ $(OBJS)
#	@$(LD) -o $@ $(OBJS)

build_msg:
	@echo "[*] Building bdlib"

include ./.deps/includes
